package testcasetool.transformation.uml.utp;

import java.util.ArrayList;
import java.util.List;

import proyecto.testcasetool.ActionStep;
import proyecto.testcasetool.Scenario;

import testcasetool.transformation.uml.activity.Action;

public class TestScenario_TestContext {
	
	private List<Action_TestComponent> testSteps = new ArrayList<Action_TestComponent>();
	private String postCondition;
	private List<Scenario> testTrail;
	
	public TestScenario_TestContext(String postCondition) {
		super();
		this.postCondition = postCondition;
	}

	public void addTestStep(ActionParameterValidity apv) {
		
		Parameter_DataPool pdp = new Parameter_DataPool(apv.getParameter(), apv.isValid());
		
		Action_TestComponent atc = new Action_TestComponent((ActionStep) apv.getActionNode().getStep(), pdp);
		
		this.testSteps.add(atc);
	}

	public void addTestStep(Action action) {
		Action_TestComponent atc = new Action_TestComponent((ActionStep) action.getStep());
		this.testSteps.add(atc);
	}

	public List<Action_TestComponent> getTestSteps() {
		return this.testSteps;
	}
	public String getPostCondition() {
		return postCondition;
	}

	public List<Scenario> getTestTrail() {
		return testTrail;
	}

	public void setTestTrail(List<Scenario> testTrail) {
		this.testTrail = testTrail;
	}

}
